<template>
  <div class="vui-app-main">
    <section :class="{ 'h-full': hasPda }">
      <VuiRouterView />
    </section>
    <vui-footer v-if="!hasPda" />
  </div>
</template>

<script>
  import { defineComponent, computed } from 'vue'
  import { useStore } from 'vuex'
  import { useRoute } from 'vue-router'
  export default defineComponent({
    name: 'VuiAppMain',
    setup() {
      const store = useStore()
      const getPageFullscreen = computed(() => store.getters['settings/getPageFullscreen'])
      const getAppInfo = computed(() => store.getters['user/getAppInfo'])
      let hasPda = true
      console.log(useRoute().path, getAppInfo.value, getPageFullscreen.value, process.env.VUE_APP_BuildProject === 'pda')
      if (getAppInfo.value.COPYRIGHT) {
        if (useRoute().path == '/dashboard' && getAppInfo.value.APP_CODE == 'WMS') {
          hasPda = true
        } else {
          hasPda = process.env.VUE_APP_BuildProject === 'pda' || getPageFullscreen.value
        }
      } else {
        hasPda = true
      }
      console.log(hasPda)
      // let hasPda = process.env.VUE_APP_BuildProject === 'pda' || getPageFullscreen
      return {
        hasPda,
      }
    },
  })
</script>
